This is an R Markdown presentation showing some graphs generated with plotly for the third week assignment of the Developing Data Products course, part of the DataScience Specialization. We’ve used the diamonds dataset as source of information
22/5/2020
This is an R Markdown presentation showing some graphs generated with plotly for the third week assignment of the Developing Data Products course, part of the DataScience Specialization. We’ve used the diamonds dataset as source of information
Cut vs. carats barplot
plot_ly(diamonds,x=~cut,y=~carat,mode="markers",color=~cut,width=800,height = 400)
Cut vs. price barplot split by color
plot_ly(diamonds,x=~cut,y=~price,mode="markers",color=diamonds$color,width=800,height = 400)
Caret vs. price barplot split by color
plot_ly(diamonds,x=~carat,y=~price,mode="markers",color=diamonds$color,size=diamonds$depth,width=800,height = 400)
plot_ly(diamonds,x=~carat,y=~price,mode="markers",color=~cut,width=800,height = 400)
Price histogram
plot_ly(x = ~diamonds$price, type = "histogram",width=800,height = 400)
Carat histogram
plot_ly(x = ~diamonds$carat, type = "histogram",width=800,height = 400)
Cut vs. carats barplot
plot_ly(diamonds, y = ~carat, color = ~diamonds$cut, type = "box",width=800,height = 400)
Color vs. carat boxplot
plot_ly(diamonds, y = ~carat, color = ~diamonds$color, type = "box",width=800,height = 400)
Carat vs. price heatmap
data <- matrix(diamonds$carat,diamonds$price) plot_ly(z = ~data, type = "heatmap",width=800,height = 400)
Carat vs. price heatmap
plot_ly(x = diamonds$x, y = diamonds$y, z = diamonds$z,type = "scatter3d", color = diamonds$cut,width=800,height = 400)